<template>

    <el-dialog title="编辑委托合同" :visible="contractEdit" @close="dialogClose" width="75%" :close-on-click-modal="false">
        <el-form :model="ruleForm" :rules="rules" ref="editForm" label-width="50px" class="demo-ruleForm" style="height: 810px;">
            <el-tabs type="card">
                <el-tab-pane label="第1页">
                    <el-row :gutter="24">
                        <el-col :span="12">
                            <img src="../../../../static/contract/head.jpg" style="height:auto; width:90%;"/>
                        </el-col>

                        <el-col :span="12">
                            <el-row :gutter="24">
                                <el-col :span="20">
                                    <el-form-item prop="wthtmc">
                                        <el-input type="text" v-model="ruleForm.wthtmc" placeholder="委托合同名称"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="10">
                                    <el-form-item prop="wtr" label="1.">
                                        <el-input type="text" v-model="ruleForm.wtr" placeholder="委托人"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="10">
                                    <el-form-item prop="wtdlr" label="2.">
                                        <el-input type="text" v-model="ruleForm.wtdlr" placeholder="委托代理人"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="10">
                                    <el-form-item prop="pmr" label="3.">
                                        <el-input type="text" v-model="ruleForm.pmr" placeholder="拍卖人"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="10">
                                    <el-form-item prop="pmdlr" label="4.">
                                        <el-input type="text" v-model="ruleForm.pmdlr" placeholder="委托代理人"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="13">
                                    &nbsp;
                                </el-col>
                                <el-col :span="2">
                                    <el-form-item>
                                        <el-button type="primary" @click="submit">保存</el-button>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                        </el-col>
                    </el-row>
                </el-tab-pane>

                <el-tab-pane label="第2页">
                    <el-row :gutter="24">
                        <el-col :span="12">
                            <img src="../../../../static/contract/1-4.png" style="height:auto; width:90%;"/>
                        </el-col>

                        <el-col :span="12">
                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="1." prop="bdzmc">
                                        <el-input type="text" v-model="ruleForm.bdzmc" placeholder="标的总名称"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item prop="zblj" label="2.">
                                        <el-input type="text" v-model="ruleForm.zblj" placeholder="总保留价"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item prop="zqpj" label="3.">
                                        <el-input type="text" v-model="ruleForm.zqpj" placeholder="总起拍价"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="4." prop="zecblj">
                                        <el-input type="text" v-model="ruleForm.zecblj" placeholder="总二次保留价"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="5." prop="zjdbfb">
                                        <el-input type="text" v-model="ruleForm.zjdbfb" placeholder="总降低百分比"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="6." prop="pmfs">
                                        <el-select v-model="ruleForm.pmfs" style="width:100%" placeholder="拍卖方式" clearable>
                                            <el-option
                                                v-for="item in this.auctionTypeOptions"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="7." prop="wtpgr">
                                        <el-input type="text" v-model="ruleForm.wtpgr" placeholder="委托评估人"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="8." prop="pgfycdr">
                                        <el-input type="text" v-model="ruleForm.pgfycdr" placeholder="评估费用承担人"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="9." prop="jdr">
                                        <el-input type="text" v-model="ruleForm.jdr" placeholder="鉴定人"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="10." prop="jdfycdr">
                                        <el-input type="text" v-model="ruleForm.jdfycdr" placeholder="鉴定费用承担人"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="11." prop="pmksrq">
                                        <el-date-picker
                                        v-model="ruleForm.pmksrq"
                                        type="datetime"
                                        placeholder="拍卖开始日期"
                                        style="width: 100%;"
                                        value-format="yyyy-MM-dd HH:mm:ss"
                                        clearable>
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-row>   

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="12." prop="pmdd">
                                        <el-input type="text" v-model="ruleForm.pmdd" placeholder="拍卖地点"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="13." prop="ggksrq">
                                        <el-date-picker
                                        v-model="ruleForm.ggksrq"
                                        type="date"
                                        placeholder="公告开始时间"
                                        style="width: 100%;"
                                        value-format="yyyy-MM-dd"
                                        clearable>
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="14." prop="ggjsrq">
                                        <el-date-picker
                                        v-model="ruleForm.ggjsrq"
                                        type="date"
                                        placeholder="公告结束时间"
                                        style="width: 100%;"
                                        value-format="yyyy-MM-dd"
                                        clearable>
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="15." prop="ggmtmc">
                                        <el-input type="text" v-model="ruleForm.ggmtmc" placeholder="公告媒体名称"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="16. 是否可以公告:" prop="sfkygg" label-width="140px">
                                        <el-radio label="true" v-model="ruleForm.sfkygg">是</el-radio>
                                        <el-radio label="false" v-model="ruleForm.sfkygg">否</el-radio>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="13">
                                    &nbsp;
                                </el-col>
                                <el-col :span="2">
                                    <el-form-item>
                                        <el-button type="primary" @click="submit">保存</el-button>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                        </el-col>
                    </el-row>
                </el-tab-pane>

                <el-tab-pane label="第3页">
                    <el-row :gutter="24">
                        <el-col :span="12">
                            <img src="../../../../static/contract/5-9.png" style="height:auto; width:90%;"/>
                        </el-col>

                        <el-col :span="12">
                            
                            <el-row :gutter="24">
                                <el-col :span="9">
                                    <el-form-item label="1." prop="bzj">
                                        <el-input type="text" v-model="ruleForm.bzj" placeholder="保证金"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="14">
                                    <el-form-item label="2." prop="bzjzbljbfb">
                                        <el-input type="text" v-model="ruleForm.bzjzbljbfb" placeholder="保证金所占保留价百分比"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="23">
                                    <el-form-item label="3. 竞买人数选择:" prop="jmrsxz" label-width="142px">
                                        <el-radio label="true" v-model="ruleForm.jmrsxz" @change="numberChange">1</el-radio>
                                        <el-radio label="false" v-model="ruleForm.jmrsxz" @change="numberChange">2</el-radio>
                                        <!-- <el-input type="text" v-model="ruleForm.zdjmrs" placeholder="最低竞买人数"></el-input> -->
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24" v-if="this.jmrsxz">
                                <el-col :span="23">
                                    <el-form-item label="4." prop="zdjmrs">
                                        <el-input type="text" v-model="ruleForm.zdjmrs" placeholder="最低竞买人数"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="23">
                                    <el-form-item label="5. 是否同意联合拍卖:" prop="sflhpm" label-width="168px">
                                        <el-radio label="true" v-model="ruleForm.sflhpm">是</el-radio>
                                        <el-radio label="false" v-model="ruleForm.sflhpm">否</el-radio>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="23">
                                    <el-form-item label="6." prop="jfr">
                                        <el-input type="text" v-model="ruleForm.jfr" placeholder="交付人"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="14">
                                    <el-form-item label="7." prop="jfjzrq">
                                        <el-date-picker
                                        v-model="ruleForm.jfjzrq"
                                        type="date"
                                        placeholder="交付截止日期"
                                        style="width: 100%;"
                                        value-format="yyyy-MM-dd"
                                        clearable>
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="23">
                                    <el-form-item label="8." prop="jfdd">
                                        <el-input type="text" v-model="ruleForm.jfdd" placeholder="交付地点"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="9." prop="jffs">
                                        <el-select v-model="ruleForm.jffs" style="width:100%" placeholder="交付方式" clearable>
                                            <el-option
                                                v-for="item in this.deliverTypeOptions"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="12">
                                    <el-form-item label="10." prop="bgfcdr">
                                        <el-input type="text" v-model="ruleForm.bgfcdr" placeholder="保管费承担人"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="23">
                                    <el-form-item label="11." prop="yjzcjjbfb">
                                        <el-input type="text" v-model="ruleForm.yjzcjjbfb" placeholder="佣金占成交价百分比"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="23">
                                    <el-form-item label="12." prop="hlfybk">
                                        <el-input type="text" v-model="ruleForm.hlfybk" placeholder="合理费用包括"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="13." prop="hlfyje">
                                        <el-input type="text" v-model="ruleForm.hlfyje" placeholder="合理费用金额"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="12">
                                    <el-form-item label="14." prop="hlfxzts">
                                        <el-input type="text" v-model="ruleForm.hlfxzts" placeholder="合理费限制天数"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="15." prop="jkzffs">
                                        <el-select v-model="ruleForm.jkzffs" style="width:100%" placeholder="价款支付方式" clearable>
                                            <el-option
                                                v-for="item in this.payTypeOptions"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                            </el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="12">
                                    <el-form-item label="16." prop="jkzfqx">
                                        <el-input type="text" v-model="ruleForm.jkzfqx" placeholder="价款支付期限"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>


                            <el-row :gutter="24">
                                <el-col :span="13">
                                    &nbsp;
                                </el-col>
                                <el-col :span="2">
                                    <el-form-item>
                                        <el-button type="primary" @click="submit">保存</el-button>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                        </el-col>
                    </el-row>
                </el-tab-pane>

                <el-tab-pane label="第4页">
                    <el-row :gutter="24">
                        <el-col :span="12">
                            <img src="../../../../static/contract/10-12.png" style="height:auto; width:90%;"/>
                        </el-col>

                        <el-col :span="12">

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="1." prop="pmccyy">
                                        <el-input type="text" v-model="ruleForm.pmccyy" placeholder="拍卖撤除原因"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="24">
                                    <el-form-item label="2. 标的未售出后选择" prop="wscxz" label-width="166px">
                                        <el-radio label="继续履行" v-model="ruleForm.wscxz"></el-radio>
                                        <el-radio label="续签合同" v-model="ruleForm.wscxz"></el-radio>
                                        <el-radio label="解除合同" v-model="ruleForm.wscxz"></el-radio>
                                        <!-- <el-input type="text" v-model="ruleForm.wscxz"></el-input> -->
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="3." prop="xdlhts">
                                        <el-input type="text" v-model="ruleForm.xdlhts" placeholder="限定领回天数"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="4." prop="wlhclfs">
                                        <el-input type="text" v-model="ruleForm.wlhclfs" placeholder="未领回处理方式"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="13">
                                    &nbsp;
                                </el-col>
                                <el-col :span="2">
                                    <el-form-item>
                                        <el-button type="primary" @click="submit">保存</el-button>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                        </el-col>
                    </el-row>
                </el-tab-pane>

                <el-tab-pane label="第5页">
                    <el-row :gutter="24">
                        <el-col :span="12">
                            <img src="../../../../static/contract/13-15.png" style="height:auto; width:90%;"/>
                        </el-col>

                        <el-col :span="12">
                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="1." prop="bmnr">
                                        <el-input type="text" v-model="ruleForm.bmnr" placeholder="保密内容"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="2." prop="wyj">
                                        <el-input type="number" v-model="ruleForm.wyj" placeholder="违约金"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="3." prop="wyjzbljbfb">
                                        <el-input type="text" v-model="ruleForm.wyjzbljbfb" placeholder="违约金占保留价百分比"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="4." prop="wyzr">
                                        <el-input type="text" v-model="ruleForm.wyzr" placeholder="违约责任"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="5. 争议解决选择:" prop="zyjjxz" label-width="140px">
                                        <el-radio v-model="ruleForm.zyjjxz" label="1"></el-radio>
                                        <el-radio v-model="ruleForm.zyjjxz" label="2"></el-radio>
                                        <!-- <el-input type="text" v-model="ruleForm.zyjjxz"></el-input> -->
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="6." prop="zcwyhmc">
                                        <el-input type="text" v-model="ruleForm.zcwyhmc" placeholder="仲裁委员会名称"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="7." prop="rmfymc">
                                        <el-input type="text" v-model="ruleForm.rmfymc" placeholder="人民法院名称"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="13">
                                    &nbsp;
                                </el-col>
                                <el-col :span="2">
                                    <el-form-item>
                                        <el-button type="primary" @click="submit">保存</el-button>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                        </el-col>
                    </el-row>
                </el-tab-pane>

                <el-tab-pane label="第6页">
                    <el-row :gutter="24">
                        <el-col :span="12">
                            <img src="../../../../static/contract/16-18.png" style="height:auto; width:90%;"/>
                        </el-col>

                        <el-col :span="12">

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="1." prop="ydy">
                                        <el-input type="text" v-model="ruleForm.ydy" placeholder="约定一"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="2." prop="yde">
                                        <el-input type="text" v-model="ruleForm.yde" placeholder="约定二"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="3." prop="yds">
                                        <el-input type="text" v-model="ruleForm.yds" placeholder="约定三"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="4." prop="htksrq">
                                        <el-date-picker
                                        v-model="ruleForm.htksrq"
                                        type="date"
                                        placeholder="合同开始时间"
                                        style="width: 100%;"
                                        value-format="yyyy-MM-dd"
                                        clearable>
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="5." prop="htjsrq">
                                        <el-date-picker
                                        v-model="ruleForm.htjsrq"
                                        type="date"
                                        placeholder="合同结束时间"
                                        style="width: 100%;"
                                        value-format="yyyy-MM-dd"
                                        clearable>
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="6." prop="wtrqz">
                                        <el-input type="text" v-model="ruleForm.wtrqz" placeholder="委托人签字"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="7." prop="wtrkhh">
                                        <el-input type="text" v-model="ruleForm.wtrkhh" placeholder="委托人开户行"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="8." prop="wtrzh">
                                        <el-input type="text" v-model="ruleForm.wtrzh" placeholder="委托人账号"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="9." prop="wtrdh">
                                        <el-input type="text" v-model="ruleForm.wtrdh" placeholder="委托人电话"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="10." prop="wtrqzrq">
                                        <el-date-picker
                                        v-model="ruleForm.wtrqzrq"
                                        type="date"
                                        placeholder="委托人签字日期"
                                        style="width: 100%;"
                                        value-format="yyyy-MM-dd"
                                        clearable>
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="11." prop="pmrqz">
                                        <el-input type="text" v-model="ruleForm.pmrqz" placeholder="拍卖人签字"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="12." prop="pmrkhh">
                                        <el-input type="text" v-model="ruleForm.pmrkhh" placeholder="拍卖人开户行"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="11">
                                    <el-form-item label="13." prop="pmrzh">
                                        <el-input type="text" v-model="ruleForm.pmrzh" placeholder="拍卖人账号"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="11">
                                    <el-form-item label="14." prop="pmrdh">
                                        <el-input type="text" v-model="ruleForm.pmrdh" placeholder="拍卖人电话"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="22">
                                    <el-form-item label="15." prop="pmrqzrq">
                                        <el-date-picker
                                        v-model="ruleForm.pmrqzrq"
                                        type="date"
                                        placeholder="拍卖人签字日期"
                                        style="width: 100%;"
                                        value-format="yyyy-MM-dd"
                                        clearable>
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="13">
                                    &nbsp;
                                </el-col>
                                <el-col :span="2">
                                    <el-form-item>
                                        <el-button type="primary" @click="submit">保存</el-button>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                        </el-col>
                    </el-row>
                </el-tab-pane>

                <el-tab-pane label="第7页">
                    <el-row :gutter="24">
                        <el-col :span="12">
                            <img src="../../../../static/contract/tail.jpg" style="height:auto; width:90%;"/>
                        </el-col>

                        <el-col :span="12">
                            <el-row :gutter="24">
                                <el-col :span="10">
                                    <el-form-item prop="pmdw" label="1.">
                                        <el-input type="text" v-model="ruleForm.pmdw" placeholder="拍卖单位"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="10">
                                    <el-form-item prop="pmje" label="2.">
                                        <el-input type="text" v-model="ruleForm.pmje" placeholder="拍卖金额"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            <el-row :gutter="24">
                                <el-col :span="20">
                                    <el-form-item prop="remark">
                                        <el-input type="textarea" v-model="ruleForm.remark" placeholder="备注"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            

                            <!-- <el-form v-for="(item, index) in lotForm" :key="index" label-width="50px">
                                <div></div>
                                <el-row :gutter="24">
                                    <el-col :span="10">
                                        <el-form-item prop="bdzl">
                                            <el-input v-model="item.bdzl" placeholder="标的种类"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="10">
                                        <el-form-item prop="sl">
                                            <el-input v-model="item.sl" placeholder="数量"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4">
                                        <el-button type="success" @click="add">添加</el-button>
                                    </el-col>
                                </el-row>
                                <el-row :gutter="24">
                                    <el-col :span="10">
                                        <el-form-item prop="blj">
                                            <el-input v-model="item.blj" placeholder="保留价"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="10">
                                        <el-form-item prop="bdmx">
                                            <el-input v-model="item.bdmx" placeholder="标的明细"></el-input>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4">
                                        <el-button type="danger" @click="del(index)">删除</el-button>
                                    </el-col>
                                </el-row>
                            </el-form> -->



                            <el-row :gutter="24">
                                <el-col :span="8">
                                    &nbsp;
                                </el-col>
                                <!-- <el-col :span="6">
                                    <el-form-item>
                                        <el-button type="primary" >excel导入</el-button>
                                    </el-form-item>
                                </el-col> -->
                                <el-col :span="2">
                                    <el-form-item>
                                        <el-button type="primary" @click="submitFinal">提交</el-button>
                                    </el-form-item>
                                </el-col>
                            </el-row>

                            

                        </el-col>
                    </el-row>
                </el-tab-pane>
                
            </el-tabs>
        </el-form>
        
    </el-dialog>

</template>
<script>
import { editData } from '@/api/auctionManage/entrustmentContract';
import { getSelectData } from '@/api/dictionary';
export default {
    components:{
        
    },
    props: {
        contractEdit: {
            type: Boolean
        },
        rowData: {
            type: Object
        }
    },
    data () {
        return {
            // lotForm: [
            //     {
            //         bdzl: '',
            //         sl: '',
            //         blj: '',
            //         bdmx: ''
            //     }
            // ],
            ruleForm: {

                wthtbh: "",//委托合同编号
                wthtmc: '',//委托合同名称
                wtr: "",//委托人
                wtdlr: "",//委托代理人
                pmr: "",//拍卖人
                pmdlr: "",//拍卖代理人
                bdzmc: "",//标的总名称
                zblj: '',//总保留价
                zqpj: '',//总起拍价
                zecblj: '',//总二次保留价
                zjdbfb: '',//总降低百分比
                pmfs: "",//拍卖方式
                wtpgr: "",//委托评估人
                pgfycdr: "",//评估费用承担人
                jdr: "",//鉴定人
                jdfycdr: "",//鉴定费用承担人
                pmksrq: "",//拍卖开始日期
                pmdd: "",//拍卖地点
                ggksrq: "",//公告开始时间
                ggjsrq: "",//公告结束时间
                ggmtmc: "",//公告媒体名称
                sfkygg: 'true',//保留价与保证金是否可以公告
                bzj: '',//保证金
                bzjzbljbfb: '',//保证金所占保留价百分比
                jmrsxz: '',//竞买人数选择
                zdjmrs: '',//最低竞买人数
                sflhpm: 'true',//是否同意联合拍卖
                jfr: "",//交付人
                jfjzrq: "",//交付截止日期
                jfdd: "",//交付地点
                jffs: "",//交付方式
                bgfcdr: "",//保管费承担人
                yjzcjjbfb: '',//佣金占成交价百分比
                hlfybk: "",//合理费用包括
                hlfyje: '',//合理费用金额
                hlfxzts: '',//合理费限制天数
                jkzffs: "",//价款支付方式
                jkzfqx: "",//价款支付期限
                pmccyy: "",//拍卖撤除原因
                wscxz: "",//标的未售出后选择
                xdlhts: '',//限定领回天数
                wlhclfs: "",//未领回处理方式
                bmnr: "",//保密内容
                wyj: '',//违约金
                wyjzbljbfb: '',//违约金占保留价百分比
                wyzr: "",//违约责任
                zyjjxz: "1",//争议解决选择
                zcwyhmc: "",//仲裁委员会名称
                rmfymc: "",//人民法院名称
                ydy: "",//约定一
                yde: "",//约定二
                yds: "",//约定三
                htksrq: "",//合同开始时间
                htjsrq: "",//合同结束时间
                wtrqz: "",//委托人签字
                wtrkhh: "",//委托人开户行
                wtrzh: "",//委托人账号
                wtrdh: "",//委托人电话
                wtrqzrq: "",//委托人签字日期
                pmrqz: '',//拍卖人签字
                pmrkhh: "",//拍卖人开户行
                pmrzh: "",//拍卖人账号
                pmrdh: "",//拍卖人电话
                pmrqzrq: "",//拍卖人签字日期
                pmdw: "",//拍卖单位
                pmje: '',//拍卖金额
                remark: "",
            },
            auctionTypeOptions: [],
            deliverTypeOptions: [],
            payTypeOptions: [],
            jmrsxz: false,


            rules: {
                wtr: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                pmr: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                bdzmc: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                zblj: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                zqpj: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                pmfs: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                pmksrq: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                pmdd: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                ggksrq: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                ggjsrq: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                sfkygg: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                zdjmrs: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                sflhpm: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                jfr: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                jfjzrq: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                jfdd: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                jffs: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                bgfcdr: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                jkzffs: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                jkzfqx: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                pmccyy: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                wscxz: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                xdlhts: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                wlhclfs: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                wyzr: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                zyjjxz: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                zcwyhmc: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                rmfymc: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                ydy: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                yde: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                yds: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                htksrq: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                htjsrq: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                wtrqz: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                wtrkhh: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                wtrzh: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                wtrdh: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                wtrqzrq: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                pmrkhh: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                pmrzh: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                pmrdh: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                pmrqzrq: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                pmdw: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                pmje: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                remark: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                ggmtmc: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                yjzcjjbfb: [
                    { required: true, message: '请选择', trigger: 'change' }
                ],
                hlfybk: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                hlfyje: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
                hlfxzts: [
                    { required: true, message: '请输入', trigger: 'change' }
                ],
            }
        };
    },
    methods: {

        submitForm () {
            this.$refs.editForm.validate((valid) => {
                if (valid) {
                    // this.ruleForm.pmksrq = this.formatTime(this.ruleForm.pmksrq);
                    // this.ruleForm.ggksrq = this.formatTime(this.ruleForm.ggksrq);
                    // this.ruleForm.ggjsrq = this.formatTime(this.ruleForm.ggjsrq);
                    // this.ruleForm.jfjzrq = this.formatTime(this.ruleForm.jfjzrq);
                    // this.ruleForm.htksrq = this.formatTime(this.ruleForm.htksrq);
                    // this.ruleForm.htjsrq = this.formatTime(this.ruleForm.htjsrq);
                    // this.ruleForm.wtrqzrq = this.formatTime(this.ruleForm.wtrqzrq);
                    // this.ruleForm.pmrqzrq = this.formatTime(this.ruleForm.pmrqzrq);
                    this.ruleForm.zblj = parseInt(this.ruleForm.zblj);
                    this.ruleForm.zqpj = parseInt(this.ruleForm.zqpj);
                    this.ruleForm.zecblj = parseInt(this.ruleForm.zecblj);
                    this.ruleForm.bzj = parseInt(this.ruleForm.bzj);
                    this.ruleForm.wyj = parseInt(this.ruleForm.wyj);
                    this.ruleForm.pmje = parseInt(this.ruleForm.pmje);
                    this.ruleForm.hlfyje = parseInt(this.ruleForm.hlfyje);
                    this.ruleForm.zdjmrs = parseInt(this.ruleForm.zdjmrs);
                    this.ruleForm.xdlhts = parseInt(this.ruleForm.xdlhts);
                    this.ruleForm.hlfxzts = parseInt(this.ruleForm.hlfxzts);
                    this.ruleForm.zjdbfb = parseFloat(this.ruleForm.zjdbfb);
                    this.ruleForm.bzjzbljbfb = parseFloat(this.ruleForm.bzjzbljbfb);
                    this.ruleForm.wyjzbljbfb = parseFloat(this.ruleForm.wyjzbljbfb);
                    this.ruleForm.yjzcjjbfb = parseFloat(this.ruleForm.yjzcjjbfb);
                    if(this.ruleForm.sfkygg == 'true'){
                        this.ruleForm.sfkygg = true;
                    }
                    else{
                        this.ruleForm.sfkygg = false;
                    }
                    if(this.ruleForm.sflhpm == 'true'){
                        this.ruleForm.sflhpm = true;
                    }
                    else{
                        this.ruleForm.sflhpm = false;
                    }
                    if(this.ruleForm.jmrsxz == 'true'){
                        this.ruleForm.jmrsxz = true;
                    }
                    else{
                        this.ruleForm.jmrsxz = false;
                    }
                    editData(this.ruleForm).then((res) => {
                        if(res){
                            console.log(res.msg);
                            this.dialogClose();
                        }
                    })
                }
                else {
                    this.$message.warning('注意必填项');
                    return ;
                }
            });
        },

        dialogClose () {
            this.$emit('dialogClose');
        },
        formatTime(time){
            var dateee = new Date(time).toJSON();
            return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
        },
        numberChange(){
            if(this.ruleForm.jmrsxz == 'false'){
                this.jmrsxz = true;
            }
            else{
                this.jmrsxz = false;
            }
        },
        submit(e){
            this.$refs.editForm.validate((valid) => {
                if (valid) {
                    console.log(e);
                    console.log('合并前',this.ruleForm);
                    this.ruleForm = Object.assign(this.ruleForm, e);
                    console.log('合并后',this.ruleForm);
                    this.$message.success('保存成功');
                }
                else {
                    this.$message.warning('注意必填项');
                    return ;
                }
            });
        },
        submitFinal(e){
            console.log(e);
            console.log('合并前',this.ruleForm);
            this.ruleForm = Object.assign(this.ruleForm, e);
            console.log('合并后',this.ruleForm);
            this.submitForm();
        },
        // del (index) {
        //     this.lotForm.splice(index, 1);
        // },
        // add () {
        //     this.lotForm.push({
        //         bdzl: '',
        //         sl: '',
        //         blj: '',
        //         bdmx: ''
        //     });
        // },
        getData(){
            let data = '拍卖方式';
            getSelectData(data).then((res) => {
                if(res){
                    for(let item in res.data){
                        this.auctionTypeOptions.push({
                            label: res.data[item],
                            value: res.data[item]
                        })
                    }
                }
            });
            let data1 = '交付方式';
            getSelectData(data1).then((res) => {
                if(res){
                    for(let item in res.data){
                        this.deliverTypeOptions.push({
                            label: res.data[item],
                            value: res.data[item]
                        })
                    }
                }
            });
            let data2 = '价款支付方式';
            getSelectData(data2).then((res) => {
                if(res){
                    for(let item in res.data){
                        this.payTypeOptions.push({
                            label: res.data[item],
                            value: res.data[item]
                        })
                    }
                }
            });

        },
    },
    mounted(){
        // console.log(this.rowData);
        this.ruleForm = this.rowData;
        // this.ruleForm.sfkygg = this.rowData.sfkygg + '';
        this.ruleForm.sflhpm = this.rowData.sflhpm + '';
        this.ruleForm.jmrsxz = this.rowData.jmrsxz + '';
        if(this.rowData.sfkygg == '是'){
            this.ruleForm.sfkygg = 'true';
        }
        else{
            this.ruleForm.sfkygg = 'false';
        }
        // console.log(this.ruleForm.jmrsxz);
        // console.log(this.ruleForm);
        this.numberChange();
    }

}
</script>
<!-- <style lang="less" scoped>

</style> -->